Foxit PDF RDK
FoxitPDFViewCtrl Namespace Reference

Foxit PDF ViewCtrl namespace. More...

Namespaces

 GeometryUtil
 GeometryUtil namespace.
 

Classes

class  CallBack
 CallBack interface. More...
 
class  FSCallBack
 FSCallBack interface. More...
 
class  IDocEventListener
 
class  IDrawEventListener
 
class  IGestureEventListener
 The gesture event listener. More...
 
class  IPageAutoEventListener
 
class  IPageEventListener
 
class  IPDFLayoutEventListener
 
class  IRecoveryEventListener
 
class  IRotationEventListener
 
class  ITouchEventListener
 
class  IUIExtensionsManager
 
struct  PDFViewCtrl
 
class  PDFViewCtrlModel
 PDFViewCtrlModel class. More...
 
class  PointF
 PointF Class. More...
 
class  RectF
 RectF Class. More...
 
class  SDKUtil
 SDKUtil Class. More...
 
class  Task
 Task Class. More...
 

Enumerations

enum  ACTION_TYPE { ACTION_START, ACTION_UPDATE, ACTION_CANCEL, ACTION_END }
 
enum  PAGE_AUTO_EVENT_TYPE
 PAGE_AUTO_EVENT_TYPE enum.
 
enum  PAGE_LAYOUT_MODE {
  UNKNOWN = 0, SINGLE, REFLOW, FACING,
  COVER
}
 PAGE_LAYOUT_MODE enum. More...
 
enum  PAGE_SPACING_DIRECTION { HORIZONTAL = 1, VERTICAL }
 PAGE_SPACING_DIRECTION enum. More...
 
enum  PDF_CROP_MODE { , CUSTOMIZE = 0 }
 PDF_CROP_MODE enum. More...
 
enum  PDF_PAGE_BINDING_EDGE { UNKNOWN = 0, LEFT, RIGHT }
 PDF_PAGE_BINDING_EDGE enum. More...
 
enum  PDF_PAGE_STYLE {
  UNKNOWN = 0, BLANK, LINED, GRID,
  GRAPH, MUSIC
}
 PDF_PAGE_STYLE enum. More...
 
enum  PDF_ZOOM_FIT_RECT_MODE { FIT_RECT, FIT_WIDTH, FIT_HEIGHT }
 PDF_ZOOM_FIT_RECT_MODE enum. More...
 
enum  PDF_ZOOM_MODE { CUSTOMIZE = 0, FIT_WIDTH, FIT_HEIGHT, FIT_PAGE }
 PDF_ZOOM_MODE enum. More...
 
enum  STATUS
 STATUS enum.
 

Functions

 updatePagesLayout ()
 
 setCropMode (mode)
 
 getCropMode ()
 
 setCropRect (pageIndex, cropRect)
 
 getCropRect (pageIndex)
 
 resetCropResources ()
 
 isPageVisible (pageIndex)
 
 invalidate (dirty=GeometryUtil.FGRectMakeZero()) addTask(task)
 
 addFSTask (task)
 
 removeTask (task)
 
 setFilePath (filePath)
 
 getFilePath ()
 
 enableTilingRefresh (isTilingRefresh)
 
 enableTurnPageBySliding (isTurnPageBySliding)
 
 scrollView (distanceX, distanceY)
 
 setMaxZoomLimit (maxZoomLimit)
 
 getMaxZoomLimit ()
 
 setMinZoomLimit (minZoomLimit)
 
 getMinZoomLimit ()
 
 isOwner ()
 
 getUserPermission ()
 
 setPageSpacing (space, direction=PAGE_SPACING_DIRECTION.HORIZONTAL)
 
 getXFADoc ()
 
 isDynamicXFA ()
 
 setAppProvider (callback)
 
 getAppProvider ()
 
 rotateView (rotation)
 
 getViewRotation ()
 
 enablePageFlippingByTouchBorder (pageFlipping)
 
 isPageFlippingByTouchBorder ()
 
 registerDocEventListener (listener)
 
 unregisterDocEventListener (listener)
 
 registerPageEventListener (listener)
 
 unregisterPageEventListener (listener)
 
 registerLayoutEventListener (listener)
 
 unregisterLayoutEventListener (listener) registerRotationEventListener(listener)
 
 unregisterRotationEventListener (listener)
 
 rotatePages (pageIndexes[], rotation)
 
 removePages (pageIndexes[])
 
 movePage (index, dstIndex)
 
 insertPages (index, width, height, style, color, rotation, count)
 
 insertPagesBySize (index, size, style, color, rotation, count)
 
 insertPagesByPath (dstIndex, flags, layerName, srcFilePath, password, pageRanges[])
 
 insertPagesByPDFDoc (dstIndex, flags, layerName, srcDoc, pageRanges[])
 
async addImagePage (dstIndex, imagePath)
 
< boolean > registerRecoveryEventListener (listener)
 
 unregisterRecoveryEventListener (listener)
 
 registerDrawEventListener (listener)
 
 unregisterDrawEventListener (listener)
 
 registerRenderEventListener (listener)
 
 unregisterRenderEventListener (listener)
 
 registerReflowEventListener (listener)
 
 unregisterReflowEventListener (listener)
 
 registerTouchEventListener (listener)
 
 unregisterTouchEventListener (listener)
 
 registerGestureEventListener (listener)
 
 unregisterGestureEventListener (listener)
 
async recoverForOOM ()
 
< void > getDoc ()
 
 setDoc (pdfDocument)
 
 getPageCount ()
 
 setPageBinding (pageBinding)
 
 getPageBinding ()
 
 registerPageAutoEventListener (listener)
 
 unregisterPageAutoEventListener (listener)
 

Detailed Description

Foxit PDF ViewCtrl namespace.

Enumeration Type Documentation

◆ ACTION_TYPE

Enumerator
ACTION_START 

Action has started.

ACTION_UPDATE 

Action is being updated.

ACTION_CANCEL 

Action has been canceled.

ACTION_END 

Action has ended.

◆ PAGE_LAYOUT_MODE

PAGE_LAYOUT_MODE enum.

Enumerator
UNKNOWN 

Unknown page mode.

Unknown zoom mode.

SINGLE 

Single page mode.

REFLOW 

Reflow mode.

FACING 

Facing mode.

COVER 

Facing mode. Cover page right.

◆ PAGE_SPACING_DIRECTION

PAGE_SPACING_DIRECTION enum.

Enumerator
HORIZONTAL 

Horizontal page spacing.

VERTICAL 

Vertical page spacing.

◆ PDF_CROP_MODE

PDF_CROP_MODE enum.

Enumerator
CUSTOMIZE 

Zoom mode: customized mode..

◆ PDF_PAGE_BINDING_EDGE

PDF_PAGE_BINDING_EDGE enum.

Enumerator
UNKNOWN 

Unknown page mode.

Unknown zoom mode.

LEFT 

he document flows from left to right

RIGHT 

The document flows from right to left.

◆ PDF_PAGE_STYLE

PDF_PAGE_STYLE enum.

Enumerator
UNKNOWN 

Unknown page mode.

Unknown zoom mode.

BLANK 

Insert new page style – blank.

LINED 

Insert new page style – line.

GRID 

Insert new page style – grid.

GRAPH 

Insert new page style – graph.

MUSIC 

Insert new page style – music.

◆ PDF_ZOOM_FIT_RECT_MODE

PDF_ZOOM_FIT_RECT_MODE enum.

Enumerator
FIT_RECT 

Zoom mode: fit rect.

FIT_WIDTH 

Zoom mode: fit page width.

FIT_HEIGHT 

Zoom mode: fit page height.

◆ PDF_ZOOM_MODE

PDF_ZOOM_MODE enum.

Enumerator
CUSTOMIZE 

Zoom mode: customized mode..

FIT_WIDTH 

Zoom mode: fit page width.

FIT_HEIGHT 

Zoom mode: fit page height.

FIT_PAGE 

Zoom mode: fit page.

Function Documentation

◆ addFSTask()

FoxitPDFViewCtrl.addFSTask ( task  )

Add task to view control.

Parameters
taskThe task which would be added.

◆ addImagePage()

async FoxitPDFViewCtrl.addImagePage ( dstIndex  ,
imagePath   
)

Add image as a page for the current document.

Parameters
dstIndexA page index in current PDF document. This is used to specify where the image will be added. If parameter dstIndex is less than 0, the image will be added to the first.
If parameter dstIndex is equal to or larger than current page count, the image will be added to the end.
imagePathThe image path. The format of the picture needs to be in line with Android's official requirements(.jpg,.png,.gif,.bmp,.webp)
Returns
true means success, while false means failure.

◆ enablePageFlippingByTouchBorder()

FoxitPDFViewCtrl.enablePageFlippingByTouchBorder ( pageFlipping  )

Whether to flip the page by touching border.

Parameters
pageFlippingtrue means to flip page by touching border.

◆ enableTilingRefresh()

FoxitPDFViewCtrl.enableTilingRefresh ( isTilingRefresh  )

Whether to refresh page view by using tiling or not.

Parameters
isTilingRefreshtrue means using tiling refresh. or refresh the whole page view.

◆ enableTurnPageBySliding()

FoxitPDFViewCtrl.enableTurnPageBySliding ( isTurnPageBySliding  )

Whether to turn the page by sliding.

NOTE: 1: if turn the page by sliding is disabled, then you should turn pages byPDFViewCtrlModel.gotoPage yourself. 2: This will only take effect when PDFViewCtrlModel.isContinuous is false.

Parameters
isTurnPageBySlidingtrue means turn page by sliding, or turn page without sliding

◆ getAppProvider()

FoxitPDFViewCtrl.getAppProvider ( )

Get the AppProviderCallback object.

Returns
The AppProviderCallback object.

◆ getCropMode()

FoxitPDFViewCtrl.getCropMode ( )
Returns
Get crop mode.

◆ getCropRect()

FoxitPDFViewCtrl.getCropRect ( pageIndex  )

Return the crop rect of the specified page.

Parameters
pageIndexPage index of the cropped page.
Returns
The crop rectangle on the PDF page, in pdf coordinate.

◆ getDoc()

<void> FoxitPDFViewCtrl.getDoc ( )

Get current displayed PDF document from view control

Returns
A PDFDoc object which represents current PDF document.

◆ getFilePath()

FoxitPDFViewCtrl.getFilePath ( )

Return the current file path.

Returns
The current file path.

◆ getMaxZoomLimit()

FoxitPDFViewCtrl.getMaxZoomLimit ( )

Get the maximum zoom bound

Returns
the maximum zoom bound, default: 8.0f

◆ getMinZoomLimit()

FoxitPDFViewCtrl.getMinZoomLimit ( )

Get the minimum zoom bound

Returns
the minimum zoom bound, default: 1.0f

◆ getPageBinding()

FoxitPDFViewCtrl.getPageBinding ( )

Get the current document's PageBinding.

Returns
The current PageBinding set on this document.

◆ getPageCount()

FoxitPDFViewCtrl.getPageCount ( )

Get the page count of PDF document.

Returns
The count of page.

◆ getUserPermission()

FoxitPDFViewCtrl.getUserPermission ( )

Get user access permissions.

Returns
User access permission. Please refer to values starting from FoxitRDKNative.PDFDoc.e_PermPrint and this can be one or combination of these values.

◆ getViewRotation()

FoxitPDFViewCtrl.getViewRotation ( )
Returns
the rotation of the view. Please refer to values starting from FoxitRDKNative.e_Rotation0 and this should be one of these values.

◆ getXFADoc()

FoxitPDFViewCtrl.getXFADoc ( )

Get the current XFA document.

Returns
A XFADoc object which represents current XFA document.

◆ insertPages()

FoxitPDFViewCtrl.insertPages ( index  ,
width  ,
height  ,
style  ,
color  ,
rotation  ,
count   
)

Insert a new blank PDF page to document, by index. After all operations are ended, you need to call the PDFViewCtrlModel.updatePagesLayout to update pages layout.

Parameters
indexA page index in current PDF document. This is used to specify where the imported pages will be inserted.
If parameter index is less than 0, the new page will be inserted to the first.
If parameter index is equal to or larger than the count of pages, the new page will be inserted to the end.
widthWidth of new page (unit is 1/72 inch).
heightHeight of new page (unit is 1/72 inch).
styleStyle of new page.Please refer to values starting from PDF_PAGE_STYLE.BLANKand this should be one of these values. Default value: PDF_PAGE_STYLE.BLANK
colorColor of new page. Format: 0xAARRGGBB.
rotationRotation value of new page. Please refer to values starting from FoxitRDKNative.e_Rotation0 and this should be one of these values except FoxitRDKNative.e_RotationUnknown
countThe count of new pages to be inserted.
Returns
true means success, while false means failure.

◆ insertPagesByPath()

FoxitPDFViewCtrl.insertPagesByPath ( dstIndex  ,
flags  ,
layerName  ,
srcFilePath  ,
password  ,
pageRanges  [] 
)

Start to import pages from another PDF document (via file path). After all operations are ended, you need to call the PDFViewCtrlModel.updatePagesLayout to update pages layout.

Note: Currently not support to import pages from a PDF which contains XFA form.

Parameters
dstIndexA page index in current PDF document. This is used to specify where the imported pages will be inserted. If parameter dstIndex is less than 0, the imported pages will be inserted to the first.
If parameter dstIndex is equal to or larger than current page count, the imported pages will be inserted to the end.
flagsOptions for importing pages. Please refer to values starting from FoxitRDKNative.PDFDoc.e_ImportFlagNormal and this can be one or combination of these values.
layerNameThe name of non-selectable label or the prefix name of the non-selectable label to be shown in layer panel of application, in UTF-8 encoding. If parameter flags contains FoxitRDKNative.PDFDoc.e_ImportFlagWithLayers, this should not be empty and should be a valid string. If parameter flags does not contain FoxitRDKNative.PDFDoc.e_ImportFlagWithLayers, this string will be ignored.
  • If all the pages of source PDF document is to be imported to current document, all layers from source document will be grouped under a non-selectable label, and this string will be directly used as the label.
  • If only part of pages of source PDF document is to be imported to current document, layers in the same page will be grouped under a single non-selectable label, and this string will be used as the prefix name of the label. The label will be like "layerName_Page_X".
srcFilePathThe file path of source PDF document, from which some pages will be imported to current PDF document.
passwordThe password string for source PDF document. It should be in UTF-8 encoding. If source PDF document is not encrypted by password, just pass an empty string.
pageRangesAn integer array which contains the page ranges of source PDF document, to be imported.
In this array, 2 numbers are a pair: the first integer is the starting page index, and the second integer is the page count.
This parameter is not null, it should contains at least 2 numbers, and the count of elements should be a multiples of 2.
Returns
true means success, while false means failure.

◆ insertPagesByPDFDoc()

FoxitPDFViewCtrl.insertPagesByPDFDoc ( dstIndex  ,
flags  ,
layerName  ,
srcDoc  ,
pageRanges  [] 
)

Start to import pages from another PDF document (via file path). After all operations are ended, you need to call the PDFViewCtrlModel.updatePagesLayout to update pages layout.

Note: Currently not support to import pages from a PDF which contains XFA form.

Parameters
dstIndexA page index in current PDF document. This is used to specify where the imported pages will be inserted. If parameter dstIndex is less than 0, the imported pages will be inserted to the first.
If parameter dstIndex is equal to or larger than current page count, the imported pages will be inserted to the end.
flagsOptions for importing pages. Please refer to values starting from FoxitRDKNative.PDFDoc.e_ImportFlagNormal and this can be one or combination of these values.
layerNameThe name of non-selectable label or the prefix name of the non-selectable label to be shown in layer panel of application, in UTF-8 encoding. If parameter flags contains FoxitRDKNative.PDFDoc.e_ImportFlagWithLayers, this should not be empty and should be a valid string. If parameter flags does not contain FoxitRDKNative.PDFDoc.e_ImportFlagWithLayers, this string will be ignored.
  • If all the pages of source PDF document is to be imported to current document, all layers from source document will be grouped under a non-selectable label, and this string will be directly used as the label.
  • If only part of pages of source PDF document is to be imported to current document, layers in the same page will be grouped under a single non-selectable label, and this string will be used as the prefix name of the label. The label will be like "layerName_Page_X".
srcDocA PDFDoc object
See also
com.foxit.sdk.pdf.PDFDoc that represents the source PDF document, whose pages will be imported to current PDF document. Please keep this source document valid until current document will not be saved any more.
Parameters
pageRangesAn integer array which contains the page ranges of source PDF document, to be imported.
In this array, 2 numbers are a pair: the first integer is the starting page index, and the second integer is the page count.
If this parameter is not null, it should contains at least 2 numbers, and the count of elements should be a multiples of 2.
Returns
true means success, while false means failure.

◆ insertPagesBySize()

FoxitPDFViewCtrl.insertPagesBySize ( index  ,
size  ,
style  ,
color  ,
rotation  ,
count   
)

Insert a new blank PDF page to document, by index. After all operations are ended, you need to call the PDFViewCtrlModel.updatePagesLayout to update pages layout.

Parameters
indexA page index in current PDF document. This is used to specify where the imported pages will be inserted.
If parameter index is less than 0, the new page will be inserted to the first.
If parameter index is equal to or larger than the count of pages, the new page will be inserted to the end.
sizeSize type of new page. Please refer to values starting from FoxitRDKNative.PDFPage.e_SizeLetterand this should be one of these values. Default value: FoxitRDKNative.PDFPage.e_SizeLetter
styleStyle of new page.Please refer to values starting from PDF_PAGE_STYLE.BLANKand this should be one of these values. Default value: PDF_PAGE_STYLE.BLANK
colorColor of new page. Format: 0xAARRGGBB.
rotationRotation value of new page.Please refer to values starting from FoxitRDKNative.e_Rotation0 and this should be one of these values except FoxitRDKNative.e_RotationUnknown
countThe count of new pages to be inserted.
Returns
true means success, while false means failure.

◆ invalidate()

FoxitPDFViewCtrl.invalidate ( dirty  = GeometryUtil.FGRectMakeZero())

Add task to view control.

Parameters
taskThe task which would be added.

◆ isDynamicXFA()

FoxitPDFViewCtrl.isDynamicXFA ( )

Check whether the current xfa document is Dynamic xfa.

Returns
true means the current xfa document is Dynamic xfa, while false means the current xfa document is not Dynamic xfa.

◆ isOwner()

FoxitPDFViewCtrl.isOwner ( )

Check whether current user is the owner.

Returns
true means current user is the owner, while false means current user is not the owner.

◆ isPageFlippingByTouchBorder()

FoxitPDFViewCtrl.isPageFlippingByTouchBorder ( )

Check whether to flip the page by touching border.

Returns
true means current user is the owner, while false means current user is not the owner.

◆ isPageVisible()

FoxitPDFViewCtrl.isPageVisible ( pageIndex  )

Check whether a specified page is visible or not.

Parameters
pageIndexPage index.Valid range: from 0 to (count-1). count is the page count.
Returns
true means the specified page is visible. false means the specified page is invisible.

◆ movePage()

FoxitPDFViewCtrl.movePage ( index  ,
dstIndex   
)

Move page to destination index. After all operations are ended, you need to call the PDFViewCtrlModel.updatePagesLayout to update pages layout.

Parameters
indexThe index of page to be moved. It should be in current PDF document.
dstIndexIndex of the destination position in page array. Valid range: from 0 to (count-1). count is returned by function PDFDoc.GetPageCount.
If parameter dstIndex is just the same as the page index of parameter page, no change will be done and this function will return true directly.
Returns
true means success, while false means failure.

◆ recoverForOOM()

async FoxitPDFViewCtrl.recoverForOOM ( )

Do the recovering when Foxit PDF SDK runs out of memory.

Foxit PDF SDK will call this method automatically. This needs to be used carefully. Current reading status will be restored, but all the editing to document will be lost.

◆ registerDocEventListener()

FoxitPDFViewCtrl.registerDocEventListener ( listener  )

Register a document event listener.

Parameters
listenerAn IDocEventListener object to be registered.

◆ registerDrawEventListener()

FoxitPDFViewCtrl.registerDrawEventListener ( listener  )

Register a draw event listener.

Parameters
listenerAn IDrawEventListener object to be registered.

◆ registerGestureEventListener()

FoxitPDFViewCtrl.registerGestureEventListener ( listener  )

Register a gesture event listener.

Parameters
listenerAn IGestureEventListener object to be registered.

◆ registerLayoutEventListener()

FoxitPDFViewCtrl.registerLayoutEventListener ( listener  )

Register a layout mode event listener.

Parameters
listenerAn ILayoutEventListener object to be registered.

◆ registerPageAutoEventListener()

FoxitPDFViewCtrl.registerPageAutoEventListener ( listener  )

Register a page auto event listener.

Parameters
listenerAn IPageAutoEventListener object to be registered.

◆ registerPageEventListener()

FoxitPDFViewCtrl.registerPageEventListener ( listener  )

Register a page event listener.

Parameters
listenerAn IPageEventListener object to be registered.

◆ registerRecoveryEventListener()

<boolean> FoxitPDFViewCtrl.registerRecoveryEventListener ( listener  )

Register an event listener for recovery from running out of memory.

Parameters
listenerAn IRecoveryEventListener object to be registered.

◆ registerReflowEventListener()

FoxitPDFViewCtrl.registerReflowEventListener ( listener  )

Register a reflow event listener.

Parameters
listenerAn IReflowEventListener object to be registered.

◆ registerRenderEventListener()

FoxitPDFViewCtrl.registerRenderEventListener ( listener  )

Register a render event listener.

Parameters
listenerAn IRenderEventListener object to be registered.

◆ registerTouchEventListener()

FoxitPDFViewCtrl.registerTouchEventListener ( listener  )

Register a touch event listener.

Parameters
listenerAn ITouchEventListener object to be registered.

◆ removePages()

FoxitPDFViewCtrl.removePages ( pageIndexes  [])

Remove pages from pdf document.

After all operations are ended, you need to call the PDFViewCtrlModel.updatePagesLayout to update pages layout.

Parameters
pageIndexesAn integer array specify which pages will be removed. If the array contains all pages, it will delete all pages except the first one and return false.
Returns
true means success, while false means failure.

◆ removeTask()

FoxitPDFViewCtrl.removeTask ( task  )

Remove the task.

Parameters
taskThe task which would be removed.

◆ resetCropResources()

FoxitPDFViewCtrl.resetCropResources ( )

Resets the crop resources. Call this before using setCropRect to apply a new crop rectangle for all pages after a previous crop has been set.

◆ rotatePages()

FoxitPDFViewCtrl.rotatePages ( pageIndexes  [],
rotation   
)

Rotate pages with specified rotation. After all operations are ended, you need to call the PDFViewCtrlModel.updatePagesLayout to update pages layout.

Parameters
pageIndexesAn integer array specify which pages will be rotated.
rotationNew page rotation value. Please refer to values starting from FoxitRDKNative.e_Rotation0 and this should be one of these values.
Returns
true means success, while false means failure.

◆ rotateView()

FoxitPDFViewCtrl.rotateView ( rotation  )

Rotates all pages in the document by using the specified degrees clockwise.

Note: After calling this method you must also update the page layout. See PDFViewCtrlModel.updatePagesLayout for more information.

Parameters
rotationThe rotation to be used. Please refer to values starting from FoxitRDKNative.e_Rotation0 and this should be one of these values.

◆ scrollView()

FoxitPDFViewCtrl.scrollView ( distanceX  ,
distanceY   
)

Scroll display view by the specified offset.

Parameters
distanceXThe distance along the X axis that has been scrolled.
distanceYThe distance along the Y axis that has been scrolled.

◆ setAppProvider()

FoxitPDFViewCtrl.setAppProvider ( callback  )

Set a customized AppProviderCallback object.

User can call this function to set a customized app provider, and this function should be called first before processing XFA document.

If this function has not been called even once, it will use the default xfa provider.

Parameters
callbackAn AppProviderCallback object, which is implemented by user and based on callback class AppProviderCallback.

◆ setCropMode()

FoxitPDFViewCtrl.setCropMode ( mode  )

Set the page crop mode. Each page will be cropped separately according to the crop mode.

Parameters
modeCrop mode. Please refer to values starting from PDF_CROP_MODE.NONE
Returns
true means success, while false means failure.
See also
PDF_CROP_MODE

◆ setCropRect()

FoxitPDFViewCtrl.setCropRect ( pageIndex  ,
cropRect   
)

Set crop rect of the specified page, others are original as default.

This method only takes effect when cropMode is set to PDF_CROP_MODE.CUSTOMIZE. After calling this method, please invoke setCropMode(PDF_CROP_MODE.CUSTOMIZE) to apply the changes.

Parameters
pageIndexPage index of the cropped page. Valid range: from 0 to (count-1). count is the page count. -1 means the same rect to all pages.
cropRectThe crop rectangle on the PDF page, in pdf coordinate, make sure left <= right, and bottom <= top.
Returns
true means success, while false means failure.

◆ setDoc()

FoxitPDFViewCtrl.setDoc ( pdfDocument  )

Set the PDF document object to view control, then open the document.

Parameters
pdfDocumentA PDFDoc object which specifies the pdf document to be opened.

◆ setFilePath()

FoxitPDFViewCtrl.setFilePath ( filePath  )

Set the file path of the current document.

Parameters
filePaththe path of the current document.

◆ setMaxZoomLimit()

FoxitPDFViewCtrl.setMaxZoomLimit ( maxZoomLimit  )

Set the maximum zoom bound.

This method sets the upper limit for zooming in. The maximum zoom limit cannot be less than 1. If a value less than 1 is provided, it will be ignored and the default value will remain in effect.

Parameters
maxZoomLimitthe maximum zoom bound, default: 8.0f

◆ setMinZoomLimit()

FoxitPDFViewCtrl.setMinZoomLimit ( minZoomLimit  )

Set the minimum zoom bound

This method sets the lower limit for zooming out. The minimum zoom limit must be greater than 0 and cannot exceed 1. If a value outside this range is provided, it will be ignored, and the default value will remain in effect.

Parameters
minZoomLimitthe minimum zoom bound, default: 1.0f

◆ setPageBinding()

FoxitPDFViewCtrl.setPageBinding ( pageBinding  )

Set the PDF_PAGE_BINDING_EDGE controlling in which direction pages of documents are laid out, either left to right (page indexed 0 will be to the left),or right to left (page indexed 0 will be on the right), default pagebinding is LEFT_EDGE.

Parameters
pageBindingThe PDF_PAGE_BINDING_EDGE to set on the document.

◆ setPageSpacing()

FoxitPDFViewCtrl.setPageSpacing ( space  ,
direction  = PAGE_SPACING_DIRECTION.HORIZONTAL 
)

Sets the vertical and horizontal spacing between adjacent pages in the view. If the layout has already been loaded, you need to call updatePagesLayout for the changes to take effect.

Note: Currently, It supports in PAGE_LAYOUT_MODE.FACING, PAGE_LAYOUT_MODE.COVER mode and PAGE_LAYOUT_MODE.SINGLE mode is continuous.

Parameters
spacespacing(in pixels) between adjacent pages in the view. Valid range: from 0 to 10. Note: The default value of the horizontal spacing is 2, and the default value of the vertical spacing is 10.
directionUsed to decide which kind of direction spacing will be set. Please refer to values starting from PAGE_SPACING_DIRECTION.HORIZONTAL and this can be one or a combination of these values.

◆ unregisterDocEventListener()

FoxitPDFViewCtrl.unregisterDocEventListener ( listener  )

Unregister a document event listener.

Parameters
listenerAn IDocEventListener object to be unregistered.

◆ unregisterDrawEventListener()

FoxitPDFViewCtrl.unregisterDrawEventListener ( listener  )

Unregister a draw event listener.

Parameters
listenerAn IDrawEventListener object to be unregistered.

◆ unregisterGestureEventListener()

FoxitPDFViewCtrl.unregisterGestureEventListener ( listener  )

Unregister a gesture event listener.

Parameters
listenerAn IGestureEventListener object to be unregistered.

◆ unregisterLayoutEventListener()

FoxitPDFViewCtrl.unregisterLayoutEventListener ( listener  )

Unregister a layout mode event listener.

Parameters
listenerAn ILayoutEventListener object to be unregistered. Unregister a rotation mode event listener.
listenerAn IRotationEventListener object to be unregistered.

◆ unregisterPageAutoEventListener()

FoxitPDFViewCtrl.unregisterPageAutoEventListener ( listener  )

Unregister a page auto event listener.

Parameters
listenerAn IPageAutoEventListener object to be unregistered.

◆ unregisterPageEventListener()

FoxitPDFViewCtrl.unregisterPageEventListener ( listener  )

Unregister a page event listener.

Parameters
listenerAn IPageEventListener object to be unregistered.

◆ unregisterRecoveryEventListener()

FoxitPDFViewCtrl.unregisterRecoveryEventListener ( listener  )

Unregister an event listener for recovery from running out of memory.

Parameters
listenerAn IRecoveryEventListener object to be unregistered.

◆ unregisterReflowEventListener()

FoxitPDFViewCtrl.unregisterReflowEventListener ( listener  )

Unregister a reflow event listener.

Parameters
listenerAn IReflowEventListener object to be unregistered.

◆ unregisterRenderEventListener()

FoxitPDFViewCtrl.unregisterRenderEventListener ( listener  )

Unregister a render event listener.

Parameters
listenerAn IRenderEventListener object to be unregistered.

◆ unregisterRotationEventListener()

FoxitPDFViewCtrl.unregisterRotationEventListener ( listener  )

Unregister a rotation mode event listener.

Parameters
listenerAn IRotationEventListener object to be unregistered.

◆ unregisterTouchEventListener()

FoxitPDFViewCtrl.unregisterTouchEventListener ( listener  )

Unregister a touch event listener.

Parameters
listenerAn ITouchEventListener object to be unregistered.

◆ updatePagesLayout()

FoxitPDFViewCtrl.updatePagesLayout ( )

Update pages layout, you should call this function to update pages layout when some pages be removed, inserted, moved or rotates all pages.

See also
link removePages}
link insertPages}
link insertPagesBySize}
link movePage}
link rotatePages}
link rotateView}